package com.hwl.demo6;

import com.hwl.demo6.entity.Resume;

/**
 * 原型模式
 *
 * @author sentry
 * @since 2023-03-18
 */
public class Main {

    public static void main(String[] args) {
        Resume resume1 = new Resume("大鸟");
        resume1.setPersonalInfo("男", 29);
        resume1.setWorkExperience("1998-2000", "XX公司");

        Resume resume2 = resume1.clone();
        resume2.setWorkExperience("2000-2003", "YY集团");

        Resume resume3 = resume2.clone();
        resume3.setPersonalInfo("男", 30);

        resume1.display();
        resume2.display();
        resume3.display();
    }
}
